export const sortBuble = (array: number[]): number[] => {
  const length = array.length;

  for (let i = 0; i < length; i++) {
    for (let j = 0; j < length - i; j++) {
      let jNext = j + 1;
      if (array[j] > array[jNext]) {
        const c = array[j];
        array[j] = array[jNext];
        array[jNext] = c;
      }
    }
  }
  
  return array;
};
